<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    {{ message }}
    <el-table
            :data="tableData"
            border
            style="width: 100%">
        <el-table-column
                prop="date"
                label="日期"
                width="180">
        </el-table-column>
        <el-table-column
                prop="name"
                label="姓名"
                width="180">
        </el-table-column>
        <el-table-column
                prop="address"
                label="地址">
        </el-table-column>
    </el-table>
    <el-pagination
            @current-change="changePage"
            background
            layout="prev, pager, next"
            :total="1000">
    </el-pagination>
</div>
<script src="data.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            message: 'Hello Vue!',
            tableData:[...tableData1],
            allData:{
                tableData1,
                tableData2,
                tableData3
            }
        },
        methods:{
            changePage(row){
                console.log(row);
                var name = "tableData"+row;
                this.tableData = this.allData[name];
            }
        }
    })
</script>
</body>
</html>
